import 'package:flutter/material.dart';

class ProductPage extends StatefulWidget {
  ProductPage({Key key}) : super(key: key);

  @override
  _ProductPageState createState() => _ProductPageState();
}

class _ProductPageState extends State<ProductPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("商品页面"),
      ),
      body: Column(
        children: <Widget>[
          RaisedButton(
            child: Text("跳转商品详情页面"),
            onPressed: () {
              //基本路由跳转需要引入页面
              // Navigator.of(context)
              //     .push(MaterialPageRoute(builder: (context) => SerarchPage()));
              Navigator.pushNamed(context, '/productInfo',
                  arguments: {'name': '商品'});
            },
          )
        ],
      ),
    );
  }
}
